package com.ojoin.trade.supplyloan_core.web.controller;

import com.ojoin.trade.common.web.controller.SimpleBaseController;
import com.ojoin.trade.common.web.domain.Result;
import com.ojoin.trade.supplyloan_core.web.domain.TbSlPlatformRule;
import com.ojoin.trade.supplyloan_core.web.service.TbSlPlatformRuleService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/operate")
public class SlPlatformRuleController extends SimpleBaseController {

	private org.slf4j.Logger log = LoggerFactory.getLogger(SlPlatformRuleController.class);

	@Autowired
	private TbSlPlatformRuleService service;

	@ResponseBody
	@RequestMapping(value = "/platformRule", method = RequestMethod.GET)
	public Result queryplatformUname() {
		List<TbSlPlatformRule> map = service.getAllEnable();
		return new Result(Result.Status.OK, map);
	}

}
